
import os, sys
from pepe.csv.cols import cols_reordered_file as crf

HELP = """Usage: csv-reorder INPFILES_S OUTFILES_S CORDER_S COLD_S
Purpose: Select and reorder columns in csv file.
Example: csv-reorder test.csv test_.csv 1-0 \"|\""""

if __name__ == '__main__':
    os.system('@chcp 1250')
    if len(sys.argv) == 5:
        crf(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4])
    else:
        print HELP
